<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      input[type="radio"] {
        /* 隐藏原生样式 */
        appearance: none;
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border: 2px solid #555;
        border-radius: 3px; /* 不再是圆形 */
        display: inline-block;
        position: relative;
        vertical-align: middle;
        cursor: pointer;
        margin-right: 6px;
      }

      /* 选中后显示一个勾 */
      input[type="radio"]:checked::after {
        content: "✔";
        font-size: 12px;
        color: #fff;
        background-color: #007bff;
        text-align: center;
        line-height: 16px;
        position: absolute;
        top: 0;
        left: 0;
        width: 16px;
        height: 16px;
        border-radius: 3px;
      }
    </style>
  </head>
  <body>
    <label>
      <input type="radio" name="fruit" checked />
      苹果
    </label>
    <label>
      <input type="radio" name="fruit" />
      香蕉
    </label>
    <label>
      <input type="radio" name="fruit" />
      橘子
    </label>
  </body>
</html>
